<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>WinA</title>
    <link rel="stylesheet" type="text/css" href="css/api.css"/>
    <link rel="stylesheet" type="text/css" href="css/box.css"/>
    <script type="text/javascript" src="script/public.js"></script>
    <style>
    	p{
    		color:#999;
    		padding:5px;
    	}
    </style>
    <script type="text/javascript">
		var mBackCard = null;
		apiready = function(){
	    	mBackCard = api.require('naxiangbackcard');
	    }

        function payForMoney(){
                 var mData = {
                    mId:1,
                    bankicon:'https://upload.wikimedia.org/wikipedia/commons/b/b8/Portrait_de_Picasso%2C_1908.jpg',
                    cardtype:'(储蓄卡0520)',
                    listItems:["{'mId':'0','url':'http://jzvd-pic.nathen.cn/jzvd-pic/00b026e7-b830-4994-bc87-38f4033806a6.jpg','text':'(储蓄卡0520)','select':'true'}",
                    "{'mId':'2','url':'http://jzvd-pic.nathen.cn/jzvd-pic/1d935cc5-a1e7-4779-bdfa-20fd7a60724c.jpg','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'3','url':'http://jzvd-pic.nathen.cn/jzvd-pic/a019ffc1-556c-4a85-b70c-b1b49811d577.jpg','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'4','url':'http://jzvd-pic.nathen.cn/jzvd-pic/f03cee95-9b78-4dd5-986f-d162c06c385c.png','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'5','url':'http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'6','url':'http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png','text':'(储蓄卡0520)','select':'false'}"],
                    index:'index_frm',
                    moved:true
                }
                mBackCard.showWithdraw(mData,function(ret){
                        <!--alert(JSON.stringify(ret));-->
             });
        }

        function hitMoney(){
                mBackCard.hideWithdraw();
        }

        function showlistitem(){
                var mData = {
                    listItems:["{'mId':'0','url':'http://jzvd-pic.nathen.cn/jzvd-pic/00b026e7-b830-4994-bc87-38f4033806a6.jpg','text':'(储蓄卡0520)','select':'true'}",
                    "{'mId':'2','url':'http://jzvd-pic.nathen.cn/jzvd-pic/1d935cc5-a1e7-4779-bdfa-20fd7a60724c.jpg','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'3','url':'http://jzvd-pic.nathen.cn/jzvd-pic/a019ffc1-556c-4a85-b70c-b1b49811d577.jpg','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'4','url':'http://jzvd-pic.nathen.cn/jzvd-pic/f03cee95-9b78-4dd5-986f-d162c06c385c.png','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'5','url':'http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'6','url':'http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png','text':'(储蓄卡0520)','select':'false'}"],
                }
                mBackCard.showListBackCard(mData,function(ret){
                        alert(JSON.stringify(ret))
                    });

        }

        function hitlistitem(){
                mBackCard.hideListItem()

        }
        function cashMoney(){
                var mData = {
                    mId:1,
                    balance:580.00,
                    bankicon:'https://upload.wikimedia.org/wikipedia/commons/b/b8/Portrait_de_Picasso%2C_1908.jpg',
                    cardtype:'(储蓄卡0520)',
                    listItems:["{'mId':'0','url':'http://jzvd-pic.nathen.cn/jzvd-pic/00b026e7-b830-4994-bc87-38f4033806a6.jpg','text':'(储蓄卡0520)','select':'true'}",
                    "{'mId':'2','url':'http://jzvd-pic.nathen.cn/jzvd-pic/1d935cc5-a1e7-4779-bdfa-20fd7a60724c.jpg','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'3','url':'http://jzvd-pic.nathen.cn/jzvd-pic/a019ffc1-556c-4a85-b70c-b1b49811d577.jpg','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'4','url':'http://jzvd-pic.nathen.cn/jzvd-pic/f03cee95-9b78-4dd5-986f-d162c06c385c.png','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'5','url':'http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'6','url':'http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png','text':'(储蓄卡0520)','select':'false'}"],
                    index:'index_frm',
                    moved:true
                }
            mBackCard.withdrawCash(mData,function(ret){
                        alert(JSON.stringify(ret))
                    });
        }
        function hidecashMoney(){
             mBackCard.hidewithdrawCash(function(ret){
                            alert(JSON.stringify(ret))
                    });

        }

        function opencashMoneyList(){

              var mData = {
                    listItems:["{'mId':'0','url':'http://jzvd-pic.nathen.cn/jzvd-pic/00b026e7-b830-4994-bc87-38f4033806a6.jpg','text':'(储蓄卡0520)','select':'true'}",
                    "{'mId':'2','url':'http://jzvd-pic.nathen.cn/jzvd-pic/1d935cc5-a1e7-4779-bdfa-20fd7a60724c.jpg','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'3','url':'http://jzvd-pic.nathen.cn/jzvd-pic/a019ffc1-556c-4a85-b70c-b1b49811d577.jpg','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'4','url':'http://jzvd-pic.nathen.cn/jzvd-pic/f03cee95-9b78-4dd5-986f-d162c06c385c.png','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'5','url':'http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png','text':'(储蓄卡0520)','select':'false'}",
                    "{'mId':'6','url':'http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png','text':'(储蓄卡0520)','select':'false'}"],
                        }
                 mBackCard.openCashMoneyItems(mData,function(ret){
                        alert(JSON.stringify(ret))
                    });
        }
        function hidecashMoneyList(){
                 mBackCard.closeCashMoneyItems()
        }

        function hitkeyboard(){
                mBackCard.hideKeyboard()
        }

        function openkeyboard(){

                    var mData={
                        keylist:['0','9','8','1','2','3','7','5','4','.','6']
                    }
                mBackCard.openKeyboard(mData,function(ret){
                        Toast(JSON.stringify(ret),1000);
                    });
        }


        	function Toast(msg,duration){
			duration=isNaN(duration)?3000:duration;
			var m = document.createElement('div');
			m.innerHTML = msg;
			m.style.cssText="width: 80%;min-width: 400px;opacity: 0.7;height: 90px;color: rgb(255, 255, 255);line-height: 30px;text-align: center;border-radius: 5px;position: fixed;top: 40%;left: 5%;z-index: 999999;background: rgb(0, 0, 0);font-size: 12px;";
			document.body.appendChild(m);
			setTimeout(function() {
				var d = 0.5;
				m.style.webkitTransition = '-webkit-transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
				m.style.opacity = '0';
				setTimeout(function() { document.body.removeChild(m) }, d * 1000);
			    }, duration);
			}

    </script>
</head>
<body>
<div id="wrap">
    <div id="main">

        <div class="clickbtn" tapmode="active" onclick="openkeyboard()">
            <button>打开自定义的输入法键盘</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="hitkeyboard()">
            <button>强制隐藏系统的输入法键盘</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="cashMoney()">
            <button>打开提现窗口</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="hidecashMoney()">
            <button>隐藏提现窗口</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="opencashMoneyList()">
            <button>打开提现更换银行卡提现窗口</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="hidecashMoneyList()">
            <button>关闭提现更换银行卡提现窗口</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="payForMoney()">
            <button>打开充值窗口</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="hitMoney()">
            <button>隐藏充值窗口</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="showlistitem()">
            <button>显示绑定的银行卡列表</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="hitlistitem()">
            <button>隐藏绑定的银行卡列表</button>
        </div>

    </div>
</div>
</body>
</html>